<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input id="btnLoad" type="button" value="加载">
<div id="divContent"></div>
<script>
    document.getElementById("btnLoad").onclick = function() {
        var xmlhttp;
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        }else {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        console.log("XMLHttpRequest:", xmlhttp);
    }
</script>
</body>
</html>